package com.yenlien.traceyun.control.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;


@Entity
@Table(name = "t_control_log")
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Log extends BaseEntity {

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "createtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createtime;

    @Column(name = "userName", length = 50)
    private String userName;

    @Column(name = "companyId", length = 50) //公司id
    private String companyId;

    @Transient
    private String companyName;



    @Column(name = "operation", length = 20)
    private String operation;               //操作栏目

    @Column(name = "profession", length = 50)
    private String profession;              //操作业务

    @Column(name = "ip", length = 50)
    private String ip;                      //ip地址

    @Transient
    private String time;                      //开始时间

    @Transient
    private String times;                     //结束时间
}
